package hemowork_8_29;

import java.io.*;

/**
 * 使用三个流  文件流  两个高级流
 */

public class Test03 {
    public static void main(String[] args) throws IOException {
        String path = "src/main/java/hemowork_8_29/";
        File file = new File(path+"." );
        File[] files = file.listFiles(
                file1->file1.getName().endsWith(".java")
        );
        BufferedReader br = null;
        String str = null;
        //遍历读取
        for (int i = 0;i< files.length;i ++){
            br = new BufferedReader(new InputStreamReader(new FileInputStream(files[i])));

            while ((str = br.readLine())!=null){
                System.out.println(str);
            }
        }
//        FileInputStream fis = new FileInputStream()
    }
}
